home *** CD-ROM | disk | FTP | other *** search
| Text File | 1989-04-26 | 1.4 KB | 74 lines | [TEXT/MPS ] |
- set linkfiles ""
- set linkfilenames ""
- set options ""
- set main ""
- set mainname ""
- set APPL ""
- set toolbox ""
-
- for i in {parameters}
- if "{i}" == "-APPL"
- set APPL "-t APPL"
- else if "{i}" == "-toolbox"
- set toolbox "{libraries}toolbox.o"
- else if "{i}" !~ /-≈/
- if "{i}" =~ /≈.[pca].o/
- set linkfiles "{linkfiles} {i}"
- set linkfilenames "{linkfilenames} {i}"
- else
- begin
- if "{i}" !~ /≈.sim.o/
- set i "{i}.sim.o"
- end if
- if {main} != ""
- set linkfiles "{linkfiles} {i}"
- if {i} =~ /(≈)®1.sim.o/
- set linkfilenames "{linkfilenames} {®1}"
- end if
- else
- set main {i}
- end if
- end
- end if
- else
- set options "{options} {i}"
- end if
- end for
-
- if {main} =~ /(≈)®1.sim.o/
- set mainname "{®1}"
- else
- set mainname {main}
- end if
-
- echo -n "Iinking {mainname} "
- if "{linkfiles}" <> 0
- echo with: {linkfilenames}
- else
- echo
- end if
-
- if "{APPL}" == ""
- Link -w -t MPST -c 'MPS ' {options} ∂
- {main} ∂
- {linkfiles} ∂
- {toolbox} ∂
- {libraries}simrtslib ∂
- {libraries}runtime.o ∂
- {libraries}interface.o ∂
- -o {mainname}
- else
- echo as an application
- Link -w {APPL} {options} ∂
- {main} ∂
- {linkfiles} ∂
- {libraries}simulastandalone.a.o ∂
- {libraries}simulainterface.p.o ∂
- {libraries}APPL_terminal.a.o ∂
- {libraries}APPL_othersvc.a.o ∂
- {toolbox} ∂
- {libraries}simrtslib ∂
- {libraries}runtime.o ∂
- {libraries}interface.o ∂
- -o {mainname}
- end if